package com.example.seataone.mapper;

import com.example.seataone.bean.One;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface OneMapper {

    @Select("SELECT * FROM one")
    List<One> list();

    @Insert("insert into one (name) values (#{name})")
    int insert(@Param("name") String name);
}